/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-11-28 19:48:30
 */
import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';

// 获取海报数据
export const getPosters = params => axios.post(`${SERVER.INFORMATION}/posters/postersTemplate/postersTemplatePage`, params);
//  编辑保存发布
export const editPubPosters = (id,params) => axios.post(`${SERVER.INFORMATION}/posters/postersTemplate/updatePostersTemplate?id=${id}`, params);
//  新增
export const addPosters = params => axios.post(`${SERVER.INFORMATION}/posters/postersTemplate/addPostersTemplate`, params);

// 编辑获取详情
// export const editPosters = (id, params) => axios.get(`${SERVER.INFORMATION}/posters/postersTemplate/getPostersTemplate?id=${id}`, {params});
//  发布
export const publishPosters = id => axios.post(`${SERVER.INFORMATION}/posters/postersTemplate/publish?id=${id}`);
//  下架
export const offPosters = id => axios.post(`${SERVER.INFORMATION}/posters/postersTemplate/off?id=${id}`);
//  删除
export const delPosters = id => axios.delete(`${SERVER.INFORMATION}/posters/postersTemplate/delPostersTemplate?id=${id}`);

